package com.shenzhen.horselive.ui.activity;

import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;

import android.os.Bundle;

import com.shenzhen.horselive.R;
import com.shenzhen.horselive.adapter.MyViewPageAdapter;
import com.shenzhen.horselive.base.AppBarActivity;
import com.shenzhen.horselive.databinding.ActivitySendReciRedDetailsBinding;
import com.shenzhen.horselive.ui.fragment.SendRedDetailsFragment;

import java.util.ArrayList;
import java.util.List;

public class SendReciRedDetailsActivity extends AppBarActivity {

    ActivitySendReciRedDetailsBinding  binding;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = ActivitySendReciRedDetailsBinding.inflate(getLayoutInflater());
        setContentView(binding.getRoot());
        setStyleDark();
        setTitle("红包明细");
        initViews();
    }

    private void initViews() {
        List<Fragment>  list = new ArrayList<>();
        list.add(SendRedDetailsFragment.newInstance("1"));
        list.add(SendRedDetailsFragment.newInstance("2"));

        List<String>  strings =new ArrayList<>();
        strings.add("收到的红包 ");
        strings.add("发出的红包");
        MyViewPageAdapter  adapter =new MyViewPageAdapter(
                getSupportFragmentManager(),list,strings);
        binding.viewpage.setAdapter(adapter);
        binding.tabs.setupWithViewPager(binding.viewpage);
    }
}